#include <stdio.h>
#include <stdlib.h>

int main(){
	int arr[10];
	int i,j,k,l;
	int max_index = 0;
	int lovely_variable = 0;
	int maxn;
	int tmp;
	k=0;
	for(i = 0;i<10;i++)
		arr[i] = rand();
	for(i = 0;i<10;i++){
		for(j = i;j<10;j++)
			if(arr[j] > arr[k]){
				k = j;
			}

			tmp = arr[i];
			arr[i] = arr[k];
			arr[k] = tmp;
			k=i+1;
		
	}
	printf("\n");
	for(i = 0; i < 10;i++)
		printf("%d ",arr[i]);
	return -1;
}
